﻿#pragma once
#include "config_data.h"
#include "../component/component_data.h"


#define sysCfg (SystemConfig::GetInstance())

class SystemConfig
{

public:
	SystemConfig();
	~SystemConfig();

	static SystemConfig* GetInstance();

	bool Init();

	QString GetConfig(ComponentType& type);

	QString GetRobotConfig();
	bool SaveRobotConfig(const QString& cfg);

private:
	bool ReadHalCfg();
	bool ReadSoftCfg();
	bool SaveHalCfg();
	bool SaveSoftCfg();

private:
	HalConfig m_hal{};
	SoftConfig m_soft{};
};
